import request from '@/utils/request'
// 公开推荐列表
export function myWorkList(query) {
  return request({
    url: '/user/work/list',
    method: 'get',
    params: query,
  })
}
// 获取用户信息
export function getUserInfo(query) {
  return request({
    url: '/user/info',
    method: 'get',
    params: query,
  })
}
// 获取评论列表
export function commentsList(query) {
  return request({
    url: '/work/comments/list',
    method: 'get',
    params: query,
  })
}
// 获取子评论列表
export function commentsListChild(query) {
  return request({
    url: '/work/subcomments/list',
    method: 'get',
    params: query,
  })
}
// 发表评论
export function leaveComment(data) {
  return request({
    url: '/work/comments',
    method: 'post',
    data: data,
  })
}
// 删除评论
export function deleteComment(data) {
  return request({
    url: '/work/comments/delete',
    method: 'post',
    data: data,
  })
}
// 点关注
export function userFollow(data) {
  return request({
    url: '/user/follow',
    method: 'post',
    data: data,
  })
}
// 评论点赞
export function commentsLike(data) {
  return request({
    url: '/work/comments/like',
    method: 'post',
    data: data,
  })
}
// 注册手机号
export function register(data) {
  return request({
    url: '/auth/phone/register',
    method: 'post',
    data: data,
  })
}
